package bookSystem.operations;

import bookSystem.book.BookList;

public class ExitOperation implements IOperation{
    //退出系统
    public void work(BookList bookList){
        System.out.println("退出系统");

        int size = bookList.getUsedSize();
        //清空书架
        for (int i = 0; i < size; i++) {
            bookList.setBooks(i,null);
        }
        bookList.setUsedSize(0);

        System.exit(0);
    }
}
